// Copyright (c) 2007-2008, 
// Trevor McCauley, http://www.senocular.com, 
// Alessandro Crugnola, http://www.sephiroth.it,
// Marc Speck, http://www.faindu.com
// All Rights Reserved. The following is Source Code and is subject to all restrictions 
// on such code as contained in the license accompanying this product.
package com.faindu.editImage.outline
{
import com.faindu.editImage.EditImage;
import com.faindu.editImage.base.BaseControl;
import com.faindu.editImage.base.BaseTool;

/**
* Tool that draws the lines around the image. It does not change the image itself. By default, 
 * <code>OutlineTool</code> is disabled.
*/
public class OutlineTool extends BaseTool
{
    //-------------------------------------------------------------------------- 
    //
    //  Properties
    //
    //--------------------------------------------------------------------------  	
	/**
	 * doc
	 */
	public var outlineControl: BaseControl
	
    //-------------------------------------------------------------------------- 
    //
    //  Methods
    //
    //--------------------------------------------------------------------------  			
	/**
	 * @inheritDoc
	 */
	override public function init( editImage:EditImage, startInteractionHandler:Function ): void
	{
		// initialize properties
		
		// create all controls
		outlineControl = new OutlineControl()

		// initialize all controlls
		outlineControl.init( editImage, startInteractionHandler, this )
	}
	
	/**
	 * @inheritDoc
	 */
	override public function draw(): void
	{
		outlineControl.draw()
	}
}
}